import Vue from "vue";
import {
  Button,
  List,
  Cell,
  SwipeCell,
  Popup,
  Form,
  Field,
  Toast,
  Icon,
  Collapse,
  CollapseItem,
  Tag,
  Search,
  Tabbar,
  TabbarItem,
  Checkbox,
  CheckboxGroup,
  Empty,
  Loading,
  PullRefresh,
  Notify,
  Skeleton,
  Dialog,
  Switch,
  NoticeBar,
  Divider,
  DropdownMenu,
  DropdownItem,
  Picker,
  Tab,
  Tabs,
  RadioGroup,
  Radio,
  ActionSheet,
  Popover,
  Overlay,
} from "vant";

Vue.use(Button);
Vue.use(List);
Vue.use(Cell);
Vue.use(SwipeCell);
Vue.use(Popup);
Vue.use(Form);
Vue.use(Field);
Vue.use(Toast);
Vue.use(Button);
Vue.use(Icon);
Vue.use(Collapse);
Vue.use(CollapseItem);
Vue.use(Tag);
Vue.use(Search);
Vue.use(Tabbar);
Vue.use(TabbarItem);
Vue.use(Checkbox);
Vue.use(CheckboxGroup);
Vue.use(Empty);
Vue.use(Loading);
Vue.use(PullRefresh);
Vue.use(Notify);
Vue.use(Skeleton);
Vue.use(Dialog);
Vue.use(Switch);
Vue.use(NoticeBar);
Vue.use(Divider);
Vue.use(DropdownMenu);
Vue.use(DropdownItem);
Vue.use(Picker);
Vue.use(Tab);
Vue.use(Tabs);
Vue.use(Radio);
Vue.use(RadioGroup);
Vue.use(ActionSheet);
Vue.use(Popover);
Vue.use(Overlay);

// 修改toast默认配置
Toast.setDefaultOptions("success", { icon: require("@/assets/toastIcon.svg") });
Toast.setDefaultOptions("fail", { icon: 'warning-o' });
Toast.setDefaultOptions("loading", {
  icon: require("@/assets/icon/loadingIcon.gif"),
  className: "addloading",
});
// 修改dialog默认配置
Dialog.setDefaultOptions({
  width: "300px",
  messageAlign: "left",
  confirmButtonColor: "#00C00E",
});
